# 清空
name_set = set(['John', 'Doe', 'Jane'])
name_set.clear()
print(name_set)

num_set = {1, 2, 3, 4, 5}
num_set.clear()
print(num_set)

# 集合的子集和超集
s1 = set([1, 2, 3, 4, 5])
s2 = set([1, 2, 3, 4, 5, 6, 7, 8, 9])
# 判断s1是否为s2的子集
print(s1.issubset(s2)) # ==> True
# 判断s2是否为s1的超集
print(s2.issuperset(s1)) # ==> True

# 判断集合是否重合
s1 = set([1, 2, 3, 4, 5])
s2 = set([1, 2, 3, 4, 5, 6, 7, 8, 9])
print(s1.isdisjoint(s2)) # ==> False，因为有重复元素1、2、3、4、5